package com.lemon.core.base.exception;

import com.lemon.core.base.result.IResultCode;
import lombok.Getter;

/**
 * 统一业务异常类
 *
 * @author pan
 * @since 2015-11-14
 */
@Getter
public class ServiceException extends RuntimeException {

    private IResultCode resultCode;

    public ServiceException(IResultCode errorCode) {
        super(errorCode.getMsg());
        this.resultCode = errorCode;
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }
}
